import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { createI18n } from 'vue-i18n'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import { Icon, addCollection } from '@iconify/vue'
import { icons } from '@iconify-json/mdi'

import App from './App.vue'
import router from './router'
import i18nOption from './locale/index'
import '@unocss/reset/tailwind-compat.css'
import 'virtual:uno.css'

addCollection(icons)
const app = createApp(App)

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

const i18n = createI18n(i18nOption)

app.use(pinia)
app.use(router)
app.use(i18n)

app.component('Icon', Icon)

app.mount('#app')
